package com.globallogic.vkulyk.JaxbHandler;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class JaxbHandlerTester {
	public String inXmlFile = "";
	public String outXmlFile = "";
	public String xsdFile = "";
	public String packDir = "";
	public String packName = "";

	private Properties properties = null;
	private String propertiesFile = null;

	public void setVarsFromPropertiesFile(String propertiesFile) {
		this.propertiesFile = propertiesFile;
		loadProperties();
		setVarsFromProperties();
	}

	public void loadProperties() {
		properties = new Properties();
		try {
			properties.load(new FileInputStream(propertiesFile));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public void setVarsFromProperties() {
		inXmlFile = properties.getProperty("inXmlFile");
		outXmlFile = properties.getProperty("outXmlFile");
		xsdFile = properties.getProperty("xsdFile");
		packDir = properties.getProperty("packDir");
		packName = properties.getProperty("packName");
	}

}
